package com.hyperf.event.client;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 消息类
 *
 * @author lizhaoyang
 */
@Getter
@Setter
public class EventMessage implements Serializable {

    private static final long serialVersionUID = -1706300149198259661L;

    /**
     * 事件类型
     */
    private String type;

    /**
     * 消息体
     */
    private byte[] message;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
